<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            display: flex;
            width: 80px;
            height: 50px;
            border: 1px solid black;
        }
        .box div {
            height: 100%;
        }
    </style>
</head>

<body>

    <!-- 
       20 * 100 /20 * 100 + 30 * 1 + 50 * 1 =  1/5
       20 * 1/5 = 4
     -->
    <div class="box">
        <div style="width: 20px; background-color: lightblue; flex-shrink: 100;"></div>
        <div style="width: 30px; background-color: lightgoldenrodyellow; "></div>
        <div style="width: 50px; background-color: lightcoral;"></div>
    </div>

</body>

</html>